<?php
/**
 * 搜索接口
 */

namespace app\frontend\controllers\homepage;

use App\common\components\BaseController;

class SearchController extends BaseController
{

    public function index()
    {
        $pluginId = request()->input('platform_id', 0);

        $data = [
            'id' => $pluginId
        ];
        return successJson('ok', $data);
    }

    /**
     * 热门搜索数据接口
     * @return \Illuminate\Http\JsonResponse
     */
    public function hotSearchData()
    {
        //获取数据
        $data = self::getData('Search', 'HotSearchData');
        return successJson('ok', $data);
    }

    /**
     * 搜索
     * @return \Illuminate\Http\JsonResponse
     */
    public function searchData()
    {
        //搜索内容
        $search = request()->input('search', 0);
        //获取数据
        $data = self::getData('Search', 'searchData');
        return successJson('ok', $data);
    }



}

